#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N = 2e5 + 10;
#define INF 0x3f3f3f3f;
typedef long long int ll;
#define close(); std::ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
//----------------------------------------------------------------------------//
int n, t;
void solve()
{
	cin >> t >> n;//t次,初始时间
	while (t--)
	{
		int p, x;
		cin >> p;
		if (p == 1)
		{
			cin >> x;
			n = (n + x) % 24000;
		}
		else if (p == 2)
		{
			cin >> x;
			n = x;
		}
		else if (p == 3)
		{
			if (n >= 0 && n < 12000) cout << "day" << '\n';
			else if (n >= 12000 && n < 13800) cout << "sunset" << '\n';
			else if (n >= 13800 && n < 22200) cout << "night" << '\n';
			else if (n >= 22200 && n < 24000) cout << "sunrise" << '\n';
		}
	}




}

int main()
{
	close();
	// int T; cin>>T;
	// while (T--) solve();
	solve();
	return 0;
}